package com.medicine.product.controller;


import com.medicine.common.base.ResponseData;
import com.medicine.product.param.CategoryParam;
import com.medicine.product.service.CategoryService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@Api(description = "商品分类")
@RestController
@RequestMapping("/category")
public class CategoryController {

    @Autowired
    private CategoryService categoryService;

    @ApiOperation(value="商品分类列表查询")
    @GetMapping("/list")
    public ResponseData list(CategoryParam categoryParam){
        return ResponseData.success("查询成功！",categoryService.selectList(categoryParam));
    }



}
